#!/usr/bin/env bash

latestString="latest_stable_hashes.tar.gz"
prevString="previous_stable_hashes.tar.gz"
latest=$( ls -l $latestString | awk '{print $NF}' )
prev=$( ls -l $prevString | awk '{print $NF}' )
new=$( ls -l github_hashes* | grep -Ev "$prev|$latest" | awk '{print $NF}' )

unlink $latestString
unlink $prevString
ln -sf $new $latestString
ln -sf $latest $prevString
rm $prev
